package com.geek.entity;

/**
 * @Desc TODO
 * @Author
 * @Date 2025/11/20
 */
public class OrderDetails {

    private Integer id;
    private Integer ordersId;
    private Integer itemsId;
    private Integer itemsNum;

    //一对一 关联商品信息
    private Item items;


    public OrderDetails() {
    }
    //用于前面测试的部分构造函数，因为关联属性是新增的，所以下面的是全属性（全参构造函数）
    public OrderDetails(Integer id, Integer ordersId, Integer itemsId, Integer itemsNum) {
        this.id = id;
        this.ordersId = ordersId;
        this.itemsId = itemsId;
        this.itemsNum = itemsNum;
    }

    public OrderDetails(Integer id, Integer ordersId, Integer itemsId, Integer itemsNum, Item items) {
        this.id = id;
        this.ordersId = ordersId;
        this.itemsId = itemsId;
        this.itemsNum = itemsNum;
        this.items = items;
    }

    /**
     * 获取
     * @return id
     */
    public Integer getId() {
        return id;
    }

    /**
     * 设置
     * @param id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取
     * @return ordersId
     */
    public Integer getOrdersId() {
        return ordersId;
    }

    /**
     * 设置
     * @param ordersId
     */
    public void setOrdersId(Integer ordersId) {
        this.ordersId = ordersId;
    }

    /**
     * 获取
     * @return itemsId
     */
    public Integer getItemsId() {
        return itemsId;
    }

    /**
     * 设置
     * @param itemsId
     */
    public void setItemsId(Integer itemsId) {
        this.itemsId = itemsId;
    }

    /**
     * 获取
     * @return itemsNum
     */
    public Integer getItemsNum() {
        return itemsNum;
    }

    /**
     * 设置
     * @param itemsNum
     */
    public void setItemsNum(Integer itemsNum) {
        this.itemsNum = itemsNum;
    }

    /**
     * 获取
     * @return items
     */
    public Item getItems() {
        return items;
    }

    /**
     * 设置
     * @param items
     */
    public void setItems(Item items) {
        this.items = items;
    }

    public String toString() {
        return "OrderDetails{id = " + id + ", ordersId = " + ordersId + ", itemsId = " + itemsId + ", itemsNum = " + itemsNum + ", items = " + items + "}";
    }
}
